//
//  MBResidentCell.m
//  发布求租
//
//  Created by MB__Lee on 2018/6/9.
//  Copyright © 2018年 MB__Lee. All rights reserved.
//

#import "MBResidentCell.h"

@interface MBResidentCell()<UITextFieldDelegate>
@property (weak, nonatomic) IBOutlet UITextField *bedroomText;

@property (weak, nonatomic) IBOutlet UITextField *livingRoomText;

@property (weak, nonatomic) IBOutlet UITextField *bathRoomText;


@end

@implementation MBResidentCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.bedroomText.delegate = self;
    self.livingRoomText.delegate = self;
    self.bathRoomText.delegate = self;
    
    self.bedroomText.tag = 100;
    self.livingRoomText.tag = 101;
    self.bathRoomText.tag = 102;
    
}
-(void)textFieldDidEndEditing:(UITextField *)textField{
    
    if (textField.tag == 100) {
        self.CMModel.sourceBedroom = textField.text;
    }else if (textField.tag == 101){
        self.CMModel.sourceLivingRoom = textField.text;
    }else if (textField.tag == 102){
        self.CMModel.sourceBathRoom = textField.text;
    }
    
}
-(BOOL)textFieldShouldReturn:(UITextField *)textField{
    [textField resignFirstResponder];
    
    return  YES;
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    
}

@end
